Skip to content

ParseXS: fix handling of empty C_ARGS etc #23408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

iabyn
Copy link
Contributor

@iabyn iabyn commented Jul 7, 2025

GH#23407

My recent refactoring work on ParseXS made the parser go into an infinite loop on multiline_merged nodes such as C_ARGS when there was no text, e.g.

void
foo(int  a)
    C_ARGS:
  • This set of changes does not require a perldelta entry.

GH#23407

My recent refactoring work on ParseXS made the parser go into an
infinite loop on multiline_merged nodes such as C_ARGS when there was no
text, e.g.

    void
    foo(int  a)
        C_ARGS:
@iabyn iabyn mentioned this pull request Jul 7, 2025
Copy link
Contributor

@jkeenan jkeenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: In the first line of the body of the commit message, I believe there should be a wordspace between GH and #. This would enable Github to create a URL.

Took a test-driven-development approach. First, locally cloned blead and added change in dist/ExtUtils-ParseXS/t/001-basic.t. Configured, built, ran that test file through harness. That operation nearly froze my machine, but eventually the program crash landed with:

ok 171 - autocall args C_ARGS: no errors expected
All 171 subtests passed 

Test Summary Report
-------------------
../dist/ExtUtils-ParseXS/t/001-basic.t (Wstat: 9 (Signal: KILL) Tests: 171 Failed: 0)
  Non-zero wait status: 9
  Parse errors: No plan found in TAP output
Files=1, Tests=171, 24 wallclock secs ( 0.02 usr  0.01 sys +  8.04 cusr 11.34 csys = 19.41 CPU)
Result: FAIL

Then created a local branch from the p.r. Configured, built, ran the test file. File went to completion:

ok
All tests successful.
Files=1, Tests=915,  6 wallclock secs ( 0.10 usr  0.02 sys +  4.34 cusr  1.49 csys =  5.95 CPU)
Result: PASS

@iabyn iabyn closed this Jul 8, 2025
@iabyn iabyn deleted the davem/xs_gh23407 branch July 8, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants